package com.cx.pojo;

import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;

public class CriticExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public CriticExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        protected void addCriterionForJDBCDate(String condition, Date value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value.getTime()), property);
        }

        protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
            }
            List<java.sql.Date> dateList = new ArrayList<java.sql.Date>();
            Iterator<Date> iter = values.iterator();
            while (iter.hasNext()) {
                dateList.add(new java.sql.Date(iter.next().getTime()));
            }
            addCriterion(condition, dateList, property);
        }

        protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
        }

        public Criteria andCriticIdIsNull() {
            addCriterion("critic_id is null");
            return (Criteria) this;
        }

        public Criteria andCriticIdIsNotNull() {
            addCriterion("critic_id is not null");
            return (Criteria) this;
        }

        public Criteria andCriticIdEqualTo(Integer value) {
            addCriterion("critic_id =", value, "criticId");
            return (Criteria) this;
        }

        public Criteria andCriticIdNotEqualTo(Integer value) {
            addCriterion("critic_id <>", value, "criticId");
            return (Criteria) this;
        }

        public Criteria andCriticIdGreaterThan(Integer value) {
            addCriterion("critic_id >", value, "criticId");
            return (Criteria) this;
        }

        public Criteria andCriticIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("critic_id >=", value, "criticId");
            return (Criteria) this;
        }

        public Criteria andCriticIdLessThan(Integer value) {
            addCriterion("critic_id <", value, "criticId");
            return (Criteria) this;
        }

        public Criteria andCriticIdLessThanOrEqualTo(Integer value) {
            addCriterion("critic_id <=", value, "criticId");
            return (Criteria) this;
        }

        public Criteria andCriticIdIn(List<Integer> values) {
            addCriterion("critic_id in", values, "criticId");
            return (Criteria) this;
        }

        public Criteria andCriticIdNotIn(List<Integer> values) {
            addCriterion("critic_id not in", values, "criticId");
            return (Criteria) this;
        }

        public Criteria andCriticIdBetween(Integer value1, Integer value2) {
            addCriterion("critic_id between", value1, value2, "criticId");
            return (Criteria) this;
        }

        public Criteria andCriticIdNotBetween(Integer value1, Integer value2) {
            addCriterion("critic_id not between", value1, value2, "criticId");
            return (Criteria) this;
        }

        public Criteria andUserIdIsNull() {
            addCriterion("user_id is null");
            return (Criteria) this;
        }

        public Criteria andUserIdIsNotNull() {
            addCriterion("user_id is not null");
            return (Criteria) this;
        }

        public Criteria andUserIdEqualTo(Integer value) {
            addCriterion("user_id =", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdNotEqualTo(Integer value) {
            addCriterion("user_id <>", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdGreaterThan(Integer value) {
            addCriterion("user_id >", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("user_id >=", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdLessThan(Integer value) {
            addCriterion("user_id <", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdLessThanOrEqualTo(Integer value) {
            addCriterion("user_id <=", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdIn(List<Integer> values) {
            addCriterion("user_id in", values, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdNotIn(List<Integer> values) {
            addCriterion("user_id not in", values, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdBetween(Integer value1, Integer value2) {
            addCriterion("user_id between", value1, value2, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdNotBetween(Integer value1, Integer value2) {
            addCriterion("user_id not between", value1, value2, "userId");
            return (Criteria) this;
        }

        public Criteria andPostIdIsNull() {
            addCriterion("post_id is null");
            return (Criteria) this;
        }

        public Criteria andPostIdIsNotNull() {
            addCriterion("post_id is not null");
            return (Criteria) this;
        }

        public Criteria andPostIdEqualTo(Integer value) {
            addCriterion("post_id =", value, "postId");
            return (Criteria) this;
        }

        public Criteria andPostIdNotEqualTo(Integer value) {
            addCriterion("post_id <>", value, "postId");
            return (Criteria) this;
        }

        public Criteria andPostIdGreaterThan(Integer value) {
            addCriterion("post_id >", value, "postId");
            return (Criteria) this;
        }

        public Criteria andPostIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("post_id >=", value, "postId");
            return (Criteria) this;
        }

        public Criteria andPostIdLessThan(Integer value) {
            addCriterion("post_id <", value, "postId");
            return (Criteria) this;
        }

        public Criteria andPostIdLessThanOrEqualTo(Integer value) {
            addCriterion("post_id <=", value, "postId");
            return (Criteria) this;
        }

        public Criteria andPostIdIn(List<Integer> values) {
            addCriterion("post_id in", values, "postId");
            return (Criteria) this;
        }

        public Criteria andPostIdNotIn(List<Integer> values) {
            addCriterion("post_id not in", values, "postId");
            return (Criteria) this;
        }

        public Criteria andPostIdBetween(Integer value1, Integer value2) {
            addCriterion("post_id between", value1, value2, "postId");
            return (Criteria) this;
        }

        public Criteria andPostIdNotBetween(Integer value1, Integer value2) {
            addCriterion("post_id not between", value1, value2, "postId");
            return (Criteria) this;
        }

        public Criteria andCriticTimeIsNull() {
            addCriterion("critic_time is null");
            return (Criteria) this;
        }

        public Criteria andCriticTimeIsNotNull() {
            addCriterion("critic_time is not null");
            return (Criteria) this;
        }

        public Criteria andCriticTimeEqualTo(Date value) {
            addCriterionForJDBCDate("critic_time =", value, "criticTime");
            return (Criteria) this;
        }

        public Criteria andCriticTimeNotEqualTo(Date value) {
            addCriterionForJDBCDate("critic_time <>", value, "criticTime");
            return (Criteria) this;
        }

        public Criteria andCriticTimeGreaterThan(Date value) {
            addCriterionForJDBCDate("critic_time >", value, "criticTime");
            return (Criteria) this;
        }

        public Criteria andCriticTimeGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("critic_time >=", value, "criticTime");
            return (Criteria) this;
        }

        public Criteria andCriticTimeLessThan(Date value) {
            addCriterionForJDBCDate("critic_time <", value, "criticTime");
            return (Criteria) this;
        }

        public Criteria andCriticTimeLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("critic_time <=", value, "criticTime");
            return (Criteria) this;
        }

        public Criteria andCriticTimeIn(List<Date> values) {
            addCriterionForJDBCDate("critic_time in", values, "criticTime");
            return (Criteria) this;
        }

        public Criteria andCriticTimeNotIn(List<Date> values) {
            addCriterionForJDBCDate("critic_time not in", values, "criticTime");
            return (Criteria) this;
        }

        public Criteria andCriticTimeBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("critic_time between", value1, value2, "criticTime");
            return (Criteria) this;
        }

        public Criteria andCriticTimeNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("critic_time not between", value1, value2, "criticTime");
            return (Criteria) this;
        }

        public Criteria andCriticTypeIsNull() {
            addCriterion("critic_type is null");
            return (Criteria) this;
        }

        public Criteria andCriticTypeIsNotNull() {
            addCriterion("critic_type is not null");
            return (Criteria) this;
        }

        public Criteria andCriticTypeEqualTo(Integer value) {
            addCriterion("critic_type =", value, "criticType");
            return (Criteria) this;
        }

        public Criteria andCriticTypeNotEqualTo(Integer value) {
            addCriterion("critic_type <>", value, "criticType");
            return (Criteria) this;
        }

        public Criteria andCriticTypeGreaterThan(Integer value) {
            addCriterion("critic_type >", value, "criticType");
            return (Criteria) this;
        }

        public Criteria andCriticTypeGreaterThanOrEqualTo(Integer value) {
            addCriterion("critic_type >=", value, "criticType");
            return (Criteria) this;
        }

        public Criteria andCriticTypeLessThan(Integer value) {
            addCriterion("critic_type <", value, "criticType");
            return (Criteria) this;
        }

        public Criteria andCriticTypeLessThanOrEqualTo(Integer value) {
            addCriterion("critic_type <=", value, "criticType");
            return (Criteria) this;
        }

        public Criteria andCriticTypeIn(List<Integer> values) {
            addCriterion("critic_type in", values, "criticType");
            return (Criteria) this;
        }

        public Criteria andCriticTypeNotIn(List<Integer> values) {
            addCriterion("critic_type not in", values, "criticType");
            return (Criteria) this;
        }

        public Criteria andCriticTypeBetween(Integer value1, Integer value2) {
            addCriterion("critic_type between", value1, value2, "criticType");
            return (Criteria) this;
        }

        public Criteria andCriticTypeNotBetween(Integer value1, Integer value2) {
            addCriterion("critic_type not between", value1, value2, "criticType");
            return (Criteria) this;
        }

        public Criteria andCriticLikeIsNull() {
            addCriterion("critic_like is null");
            return (Criteria) this;
        }

        public Criteria andCriticLikeIsNotNull() {
            addCriterion("critic_like is not null");
            return (Criteria) this;
        }

        public Criteria andCriticLikeEqualTo(Integer value) {
            addCriterion("critic_like =", value, "criticLike");
            return (Criteria) this;
        }

        public Criteria andCriticLikeNotEqualTo(Integer value) {
            addCriterion("critic_like <>", value, "criticLike");
            return (Criteria) this;
        }

        public Criteria andCriticLikeGreaterThan(Integer value) {
            addCriterion("critic_like >", value, "criticLike");
            return (Criteria) this;
        }

        public Criteria andCriticLikeGreaterThanOrEqualTo(Integer value) {
            addCriterion("critic_like >=", value, "criticLike");
            return (Criteria) this;
        }

        public Criteria andCriticLikeLessThan(Integer value) {
            addCriterion("critic_like <", value, "criticLike");
            return (Criteria) this;
        }

        public Criteria andCriticLikeLessThanOrEqualTo(Integer value) {
            addCriterion("critic_like <=", value, "criticLike");
            return (Criteria) this;
        }

        public Criteria andCriticLikeIn(List<Integer> values) {
            addCriterion("critic_like in", values, "criticLike");
            return (Criteria) this;
        }

        public Criteria andCriticLikeNotIn(List<Integer> values) {
            addCriterion("critic_like not in", values, "criticLike");
            return (Criteria) this;
        }

        public Criteria andCriticLikeBetween(Integer value1, Integer value2) {
            addCriterion("critic_like between", value1, value2, "criticLike");
            return (Criteria) this;
        }

        public Criteria andCriticLikeNotBetween(Integer value1, Integer value2) {
            addCriterion("critic_like not between", value1, value2, "criticLike");
            return (Criteria) this;
        }

        public Criteria andCriticScoreIsNull() {
            addCriterion("critic_score is null");
            return (Criteria) this;
        }

        public Criteria andCriticScoreIsNotNull() {
            addCriterion("critic_score is not null");
            return (Criteria) this;
        }

        public Criteria andCriticScoreEqualTo(Long value) {
            addCriterion("critic_score =", value, "criticScore");
            return (Criteria) this;
        }

        public Criteria andCriticScoreNotEqualTo(Long value) {
            addCriterion("critic_score <>", value, "criticScore");
            return (Criteria) this;
        }

        public Criteria andCriticScoreGreaterThan(Long value) {
            addCriterion("critic_score >", value, "criticScore");
            return (Criteria) this;
        }

        public Criteria andCriticScoreGreaterThanOrEqualTo(Long value) {
            addCriterion("critic_score >=", value, "criticScore");
            return (Criteria) this;
        }

        public Criteria andCriticScoreLessThan(Long value) {
            addCriterion("critic_score <", value, "criticScore");
            return (Criteria) this;
        }

        public Criteria andCriticScoreLessThanOrEqualTo(Long value) {
            addCriterion("critic_score <=", value, "criticScore");
            return (Criteria) this;
        }

        public Criteria andCriticScoreIn(List<Long> values) {
            addCriterion("critic_score in", values, "criticScore");
            return (Criteria) this;
        }

        public Criteria andCriticScoreNotIn(List<Long> values) {
            addCriterion("critic_score not in", values, "criticScore");
            return (Criteria) this;
        }

        public Criteria andCriticScoreBetween(Long value1, Long value2) {
            addCriterion("critic_score between", value1, value2, "criticScore");
            return (Criteria) this;
        }

        public Criteria andCriticScoreNotBetween(Long value1, Long value2) {
            addCriterion("critic_score not between", value1, value2, "criticScore");
            return (Criteria) this;
        }

        public Criteria andStatusIsNull() {
            addCriterion("status is null");
            return (Criteria) this;
        }

        public Criteria andStatusIsNotNull() {
            addCriterion("status is not null");
            return (Criteria) this;
        }

        public Criteria andStatusEqualTo(Integer value) {
            addCriterion("status =", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotEqualTo(Integer value) {
            addCriterion("status <>", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThan(Integer value) {
            addCriterion("status >", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
            addCriterion("status >=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThan(Integer value) {
            addCriterion("status <", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThanOrEqualTo(Integer value) {
            addCriterion("status <=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusIn(List<Integer> values) {
            addCriterion("status in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotIn(List<Integer> values) {
            addCriterion("status not in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusBetween(Integer value1, Integer value2) {
            addCriterion("status between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotBetween(Integer value1, Integer value2) {
            addCriterion("status not between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andOther1IsNull() {
            addCriterion("other1 is null");
            return (Criteria) this;
        }

        public Criteria andOther1IsNotNull() {
            addCriterion("other1 is not null");
            return (Criteria) this;
        }

        public Criteria andOther1EqualTo(String value) {
            addCriterion("other1 =", value, "other1");
            return (Criteria) this;
        }

        public Criteria andOther1NotEqualTo(String value) {
            addCriterion("other1 <>", value, "other1");
            return (Criteria) this;
        }

        public Criteria andOther1GreaterThan(String value) {
            addCriterion("other1 >", value, "other1");
            return (Criteria) this;
        }

        public Criteria andOther1GreaterThanOrEqualTo(String value) {
            addCriterion("other1 >=", value, "other1");
            return (Criteria) this;
        }

        public Criteria andOther1LessThan(String value) {
            addCriterion("other1 <", value, "other1");
            return (Criteria) this;
        }

        public Criteria andOther1LessThanOrEqualTo(String value) {
            addCriterion("other1 <=", value, "other1");
            return (Criteria) this;
        }

        public Criteria andOther1Like(String value) {
            addCriterion("other1 like", value, "other1");
            return (Criteria) this;
        }

        public Criteria andOther1NotLike(String value) {
            addCriterion("other1 not like", value, "other1");
            return (Criteria) this;
        }

        public Criteria andOther1In(List<String> values) {
            addCriterion("other1 in", values, "other1");
            return (Criteria) this;
        }

        public Criteria andOther1NotIn(List<String> values) {
            addCriterion("other1 not in", values, "other1");
            return (Criteria) this;
        }

        public Criteria andOther1Between(String value1, String value2) {
            addCriterion("other1 between", value1, value2, "other1");
            return (Criteria) this;
        }

        public Criteria andOther1NotBetween(String value1, String value2) {
            addCriterion("other1 not between", value1, value2, "other1");
            return (Criteria) this;
        }

        public Criteria andOther2IsNull() {
            addCriterion("other2 is null");
            return (Criteria) this;
        }

        public Criteria andOther2IsNotNull() {
            addCriterion("other2 is not null");
            return (Criteria) this;
        }

        public Criteria andOther2EqualTo(String value) {
            addCriterion("other2 =", value, "other2");
            return (Criteria) this;
        }

        public Criteria andOther2NotEqualTo(String value) {
            addCriterion("other2 <>", value, "other2");
            return (Criteria) this;
        }

        public Criteria andOther2GreaterThan(String value) {
            addCriterion("other2 >", value, "other2");
            return (Criteria) this;
        }

        public Criteria andOther2GreaterThanOrEqualTo(String value) {
            addCriterion("other2 >=", value, "other2");
            return (Criteria) this;
        }

        public Criteria andOther2LessThan(String value) {
            addCriterion("other2 <", value, "other2");
            return (Criteria) this;
        }

        public Criteria andOther2LessThanOrEqualTo(String value) {
            addCriterion("other2 <=", value, "other2");
            return (Criteria) this;
        }

        public Criteria andOther2Like(String value) {
            addCriterion("other2 like", value, "other2");
            return (Criteria) this;
        }

        public Criteria andOther2NotLike(String value) {
            addCriterion("other2 not like", value, "other2");
            return (Criteria) this;
        }

        public Criteria andOther2In(List<String> values) {
            addCriterion("other2 in", values, "other2");
            return (Criteria) this;
        }

        public Criteria andOther2NotIn(List<String> values) {
            addCriterion("other2 not in", values, "other2");
            return (Criteria) this;
        }

        public Criteria andOther2Between(String value1, String value2) {
            addCriterion("other2 between", value1, value2, "other2");
            return (Criteria) this;
        }

        public Criteria andOther2NotBetween(String value1, String value2) {
            addCriterion("other2 not between", value1, value2, "other2");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}